package com.jiangli.context;

import javax.print.DocFlavor;

public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    public static ThreadLocal<String> loginType = new ThreadLocal<>();

    public static void setLoginType(String loginType) {BaseContext.loginType.set(loginType);}

    public static String getLoginType() {return loginType.get();}

    public static void removeLoginType() { BaseContext.loginType.remove();}

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
